{template 'phpcms','header'}
<!--begin main-->
<div id="main">
  <div id="main_l" class="bdr_1">
    <!--位置导航-->
    <div id="position"><a href="">首页</a>{catpos($r['catid'])}</div>
    <div id="content">
      <table align="center" cellpadding="0" cellspacing="1" class="down_info">
        <caption>
        <span  class="{$style}">{$title}</span>
        </caption>
        <tr>
          <th>授权形式：</th>
          <td> {$copytype}</td>
          <td width="260" rowspan="7"><img src="{if $r[thumb]}{$r[thumb]}{else}images/nopic.gif{/if}" width="260"></td>
        </tr>
        <tr>
          <th>更新时间：</th>
          <td> {$updatetime}</td>
        </tr>
        <tr>
          <th>软件语言：</th>
          <td> {$language}</td>
        </tr>
        <tr>
          <th>软件平台：</th>
          <td> {$systems}</td>
        </tr>
        <tr>
          <th>软件类别：</th>
          <td> {$classtype}</td>
        </tr>
        <tr>
          <th>文件大小：</th>
          <td> {$filesize}</td>
        </tr>
        <tr>
          <th>评论等级：</th>
          <td class="c_orange"> {$stars}</td>
        </tr>
		<tr>
          <th>下载次数：</th>
          <td colspan=2><span id="hits">0</span>（今日：<span id="todaydowns">{$todaydowns}</span>，本周：<span id="weekdowns">{$weekdowns}</span>，本月：<span id="monthdowns">{$monthdowns}</span>）</td>
        </tr>
      </table>
      <h3>软件简介</h3>
      <div id="down_intro">{$content}</div>
      <h3>下载地址</h3>
      <div id="down_address">
	  {$downurl}
	  {$downurls}
	  </div>
      <h3>相关软件</h3>
      <div>
        <ul class="text_list">
          {tag_内容页相关信息}
        </ul>
      </div>
	  {if isset($MODULE[mail])}
      <form action="{$MODULE[mail][url]}sendmail.php" name="sendmail" id="sendmail">
        <input type="hidden" name="title" value="推荐：{$title}" />
        <input type="hidden" name="content" value=" <a href='{SITE_URL}{$url}' target='_blank'>{$title}</a><br/>" />
      </form>
      {/if}
      {if isset($MODULE[error_report])}
      <form action="{$MODULE[error_report][url]}error_report.php" name="errors" id="errors">
        <input type="hidden" name="title" value="{$title}" />
		<input type="hidden" name="contentid" value="{$contentid}" />
      </form>
      {/if}
      <p id="text_1" style="margin-top:3px;"> 
        {if isset($MODULE[error_report])}<a href="javascript:$('#errors').submit();">[错误报告]</a>{/if} 
        {if isset($MODULE[mail])}<a href="javascript:$('#sendmail').submit();">[推荐]</a>{/if} 
        <a href="member/collect.php?contentid={$contentid}&action=add">[收藏]</a> 
        <a href="javascript:window.print();">[打印]</a> 
        <a href="javascript:window.close();">[关闭]</a> <a href="{SITE_URL}{$url}#top">[返回顶部]</a> 
      </p>
      <!--评论-->
      {if isset($MODULE[comment])}
      {php list($keyid, $verify) = keyid_make('phpcms', 'content', 'title', $contentid);}
      <div id="commnent_tag">
        <a href="{$MODULE[comment][url]}?keyid={$keyid}&verify={$verify}"><img src="images/comment.gif" alt=""/></a> 
        当前共有<strong class="c_red"><span id="comments">0</span></strong>人发表了评论.
      </div>
      <div class="commenttext" style="text-align:center;margin-top:2%">
        <form action="{$MODULE[comment][url]}?action=addpost" method="post" onSubmit="return checkForm();">
			<input type="hidden" name="keyid" value="{$keyid}"/>
			<input type="hidden" name="verify" value="{$verify}"/>
		<ul>
          <li>
            <textarea cols="100" rows="8" name="comment" id="comment" onfocus="reply_clearfield()" onblur="reply_restoration()"></textarea>
          </li>
          <li style="text-align:left;margin-left:1%;margin-top:1%;">
            <span id="checker"><div style="float:left">验证码：</div><input type="text" style="ime-mode: disabled;" size="6" id="checkcode" name="checkcode" /><img src="" id="code_img" style="display:none" onclick="this.src='checkcode.php?'+Math.random()" alt="点击换一张"></span>
            <input id="dosubmit" name="dosubmit" type="submit" value="发表评论" />
          </li>
        </ul>
        </form>
      </div>
      <script type="text/javascript" src="data/js/comment_setting.js"></script>
      <script>
        $().ready(function() {
            if(setting.ischecklogin == 0 && getcookie('auth') === null)
            {
                $('#comment').val("请您登陆后发表评论！");
                $('#comment').attr("disabled","disabled");
                $('#dosubmit').attr("disabled","disabled");
            }
            else 
            {
                $('#comment').val("我也来说两句！");
            }
        });
        function reply_restoration()
        {
            if($('#comment').val() == '')
            {
                $('#comment').val("我也来说两句！");
            }
        }
        function reply_clearfield()
        {
            if ($('#comment').val() == "我也来说两句！") 
            {
                $('#comment').val("");   
            }
			document.getElementById('code_img').style.display = 'block';document.getElementById('code_img').src='checkcode.php';
        }
        function checkForm()
        {
            if($('#comment').val() == '' || $('#comment').val() == "我也来说两句！")
            {
                alert("内容不能为空");
                $('#comment').focus();
                return false;
            }
            if($('#checkcode').val() == '' )
            {
                alert("验证码不能为空");
                $('#checkcode').focus();
                return false;
            }
            if ($('#comment').val().length > 1000) 
            {
                alert("内容太长，最多 1000 个文字");
                return false;
            }
        }
      </script>
      {/if}
      </div>
    <div class="clear" style="margin-top:1%"></div>
  </div>
  <div id="main_r">
    <h4>推荐下载</h4>
    <div>
      <ul class="pic_list">
       {tag_内容页推荐下载}
      </ul>
    </div>
    <h4>最新下载</h4>
    <div>
      <ul class="text_list">
       {tag_内容页最新下载}
      </ul>
    </div>
	<!--{block("list_down", 1)}-->
  </div>
</div>
<!--end main-->
<script language="JavaScript" src="count.php?contentid={$contentid}&model=down"></script>
{template 'phpcms','footer'}